Correct some sonar issues