Cherry pick db6d9b29e07b033 from master
Cherry pick 373793b013877eb5 from master
Cherry pick 4842c3a6784f8b20c from master