Merge pull request #1016 from oliverds/master

A couple of enhancements