fix for #185
fix for #192
Merge pull request #193 from janno42/develop

Fixes for #185 and #192