fix marshal null value; add oncommit in UndoContext