Fixed some sonar problems