fix bug: Player continues walking if mode changed during walk