fix sonar errors