Merge upstream 2.1.1

Merges all changes from the 2.1.1 tag into the 2.1 branch.

/cc @charliesome @tmm1