CDM: Coverity and IntelliJ fixes.