Cherry picked commit from UI branch.