Cleaning up the cursor.