closing cursor, per issue #12