fixed some sonar-errors