fix page generation