fixed passsing values to kernel