Sonar violation fixes.