a couple coverity fixes