Fixed some other issues found by Coverity Scan.