Fixed bug in MPI adapter code