More fixes of Sonar errors