Fix to make cursor changing a bit more responsive.