Fix a few more issues found by Coverity.
Fix a few more issues found by Coverity.