fixed sonar issues.