Fix for CUDA