Fixed critical sonar issues