small bug fixes in mpi version