Fixed bug when fetching a range of items.