Fixed a bug that would throw an exception if no items were returned in a list.