Merge pull request #326 from baev/sonar-fixes

Sonar fixes
Sonar fixes, part 2