Fix (global) db leakage, by making db local.
Thanks to mickhansen for the fix.
Merge pull request #900 from xming/master

Fix (global) db leakage, by making db local.
Update changelog.md