Fix Sonar alerts