Merge pull request #1 from benighted/master

added error handling when closing pg cursor
Merge pull request #2 from benighted/master

fix for write counter without write concern
Merge pull request #2 from trollandtoad/master

fix for write counter without write concern