fix auto-cursor