fixed some sonar-violations