Fixes for #185 and #192