fixed database closing
Merge pull request #15 from GoldRenard/personalization-fix

fixed database closing