Fixed sonar issues.