Fix Table_exists Function