Added test for GitHub issue #39