Fix sonar violations