fixed (amybe) some weird multi-threading/mpi bug