Workaround for CUDA bug
Merge pull request #738 from peastman/bug

Workaround for CUDA bug