Undo moves before returning