Revert "Fixing undo feature"

This reverts commit daabf1d7e6e0cf97b7aa9288216d33b0b1a1debb.