close cursors
More db resource leaks
Merge pull request #160 from fefe982/develop

Fixed some db resource leaks