fix task logic error