Fixes the issue posted in issue #174

This fixes issues #174 

Close #174