fixed error in setting kernel arguments