Possibly fixed a bug in the undo movement shifting