Fixed bug causing response body to be accessed incorrectly