Fix the issue found in the static analysis
Merge pull request #92 from bellgrim/coverity

Fix the issues found in the static analysis