Update following pull request

Fixes #173
Fixes #182