fixes #1 undo and redo working fine !