fixed an issue related to null httpContext