Fix unit test failures caused by recent flow changes