A few more bugfixes for MPI and CUDA.