fix #25
Database locks fixed.
Merge branch 'hotfix/DBLockFix'