coverity scan fixes