Coverity fixes

Just a couple of minor fixes coverity flagged up.