Merge pull request #1389 from danielboulby-arm/db/bugfix

Code change to fix small bugs