Apply fixes to quiten Coverity