Added undo group to fix undo history