coverity scan defects fixed