Fix for Issue #336
Merge pull request #337 from wettenhj/issue_336

Fix for Issue 336