offline undo bug fixed