add tests for issue #142
fixed #142
Merge branch 'issue-142'