Take into account the offset also when releasing the cursor.