Fix coverity issues.