Fix does_table_exist