Issue #167

This is a patch/pull request for 0.9.x, not master. resolves issue 167