Fix mixup in histUndo and histRedo