Fixed undo height bug