Merging fixes for #146 and #144 from hotfix-1.0.2
Fixing issue #111