Fixed Sonar findings.