Fixed an issue with check_table_exist