Fix for #171

Fixes #171.