Fixed bug where undo clear contents did not

update equation map correctly.