changed defer response body close