base list pagination fix

Fixed lists pagination in templates.