Fixed bugs in the variables send when they are not cl_mem ones