Take into account the offset also when releasing the cursor.
Merge pull request #201 from egofree71/master

Take into account the offset also when releasing the cursor.