Cherry pick of AI-612