[coverity] a couple of fixes