fixed bug in MPIbarrier fix