Coverity fixes
follow up
follow up
Merge pull request #93 from reneme/fix_coverity

Coverity fixes