Removed unnecessary database close call