fix sonar warnings