fix some Sonar issues