fix toggle task errors.