fixing page counter