fix some bugs when failed to retrive web pages