Undo command was not working