Fixes to close issue #187