Sonar violations fixed