Change method of setting arguments to kernel to safe one