Fixes #176

See issue #176