fix for #109 with unit test