Fixing Sonar errors.