num_tasks is wrong when region is specified
#854
Merged
num_tasks is wrong when region is specified
#854