Fixes #172, #173