fix undo assignment issues