fix bug in redo