Bugfix in opencl index calculations