Some more fixes to make Coverity happy