fixed bugs int selecting the standard CUDA device