Mpi fixes

Merged Matthieu Schaller requested to merge mpi_fixes into master

Merge request reports