changed kernel.set to support unsuccssful set