close the cursor.