Fixed bugs in using cuda-aware MPI