coverity issues fixed