fix page counter