fixed 500 status error when retrieving a collection that is not paginated