Fixed bugs that prevented the release of Database .sqlite file handles.