fixed check_table_exists to not assume table exists wrongly