fixing task processing workflow