fix minor bugs when OpenCL is not available