Fix #18: Fix "not a valid cURL handle resource" error