Removed database close() calls - caused problems in some instances