Cherry pick AS commits from master to 4.2.x branch