Fixed issues in page count