Fixed bug in MPI fitting