Fixes #171
Fixes #172