Fix Coverity issues