[Fix] Cursor not closed