fixed mpi detection