Coverity scan CID 14438, 14437
Coverity scan CID 14403
Coverity scan CID 14407
Merge pull request #153 from alexander-zimmermann/next

Coverity scan fixes