Fix build and UT.