fix cursor issue