Fix critical sonar issue