fix sonar violation