fix http connetcion bugs