Fixed sonar violations.