Attempt to fix Coverity Scan defects