Fixed cursor bug. Closed databases.
Merge pull request #1 from Spidy88/master

Fixed cursor bug. Closed databases.