Fixed bug where undo didn't work if objectHash was empty and prevented redundant object creation