Added tests for Issue #137
Added fix for Issue #137
Merge pull request #141 from Tavriets/master

Tests and fix for issue #137.