Fix for #175
Fix for #147