fix some sonar violations