Sonar fixes, part 2

Sonar fixes, part 2