some cleaup in mpi