Fixed segmentation fault if http context is not defined.