Fix the bug of finding all tables in database.