adding functional test for #46
adding code fix for #46
0.4.2