fix coverity issues