Some changes due to static code analysis.