fix redo encode