[BUGFIX] Possible division by zero in PaginateController