Fixed http.Agent object creation