Issue 140 - fixes

Possible fixes for issue #140.