Fixed CURL response reading