Fixed bug when shapes came back after undo