bugfix for issue #35; add test file