fix Coverity defects