Add missing reset of undo manager stack