fix Coverity warnings