made opencl class more forgiving