fix some bugs with http check