Fix Sonar warnings.