Fixes issues #225 and #226
Merge remote-tracking branch 'origin/hotfix-issue225' into hotfix-issue225