fix the undo method for deadline