fixed bug in parallel_map that occurs when there are more cores than there are tasks to delegate