fix curl redirection