fixes the return of httpcontext