fixes to MPI communication