Sonar fixes, part 2
Merge pull request #327 from baev/sonar-fixes

Sonar fixes, part 2