Fixed several errors in doMove