More sonar violation fixes