Cherry pick #2472