fix no tasks given in parallel function