Correcting a bug on MPI communication