Included check for updated constants
Extended $items check for pagination with no items