Bug in check for num_processes -> M+1