Bugfix: check if pageCount is null or > 0