curl-related bug fix