fix divide_pages for pages_per_block