Fixed bug for when there are no items in database