implemented tests based on @uholzer report to issue #35
fixed a side-effect of issue #35
possible solution for issue #35