prevent another cursor leak

// FREEBIE
Merge pull request #1861 from mcginty/cursor-leak

prevent another cursor leak