Fix unclosed curl handle