Fix for curl returning null every time (See Issue #2)

Thanks @m-vo for providing a fix.