Resolve bugs with iteration missing the first or last element.
Add a threading lock around inserting response data.