v2.1
Merge pull request #1039 from am11/master

Miscellaneous fixes