fixed some sonar findings