Updated to fix support for CUDA