fixed generation of pages