fix cursor not close