VIDEO-13 fix some sonar critical violations