Curl status code fix and schema detection bug fixes