hotfix closing db