Fixed "database locked" exception when transaction is rolling back
Comments improved
Merge pull request #478 from acc15/fix-database

Fixed "database locked" exception when transaction is rolling back