fix #209
add test for #209