fixed HTTP connection failure handling