Small fixes for sonar issues.