fix cursor jumping