A few cherry picks off the 3.2.x branch

Cherry picking a few fixes off the 3.2.x branch.