Fix unit test crash.

self-merge