Fixed code for inputting move.