Fixing Sonar issues.