Fix CUDA back end.