fix #343
add respective #343 test
fixes #328