fix and test for #237