Validation and pagination fixes