Fixes the issue that undo/redo didn't work when undo pointer reached the root element. changes undo procedure to handle no operation status properly