A few Coverity fixes