Fix response parsing and output