Fixing issue with pagecounts