Fix bug when user inputs an invalid move.