Fix some sonar issues

fix some sonar issues