Fix to avoid issue with host header being overwritten