A few coverity fixes.