Sonar violations fix