Fixed a couple of Sonar violations.