[HttpKernel] tweaked the code