Fixed bug where undo button was not working...

after typing.