fix for #147
tests for fix for #147