Curl try catch bug fix