Fix truncate pages in generate command