fixed some sonar bugs