Fix tableExists(). Fix its test. Write a test on async.