use snapshot and exhaust for cursors

minor bug fixes