Update to first_page and replace_tables

fixed tables