Fixed cursor getting stuck