fixed cursor changing issue