Renamed num_mc_tasks to num_tasks