Fixed cuda device index