error checking in undo