fix cursor problem