Fixed some bugs in OpenMP + CUDA