Merge 3.1 back

Merge 3.1 back.