Potential fix for issue #891

Fixes unsanitized input for $this->maxPerPage