undo move correctly