fixed invalid move issue