GPU fix

CUDA no longer fails on Apple, plus some additional CUDA fixes.