Sonar fixes
Fix PR #235
Merge pull request #326 from baev/sonar-fixes

Sonar fixes