fix build errors from previous cherry-pick