Bugfix and Undo/Redo
Merge pull request #429 from anserran/master

Bugfix and Undo/Redo