fix coverity defects