another attempt at fixing page count issues