Fix for Issue #340
Merge pull request #341 from wettenhj/issue_340

Fix for Issue 340