Some small fixes

- fix some scrutinizer identified issues
- resolve #226
Merge pull request #227 from geekwright/small-fixes

Some small fixes