Fixed the problems with the mpi code. Yay!