Fixed some warnings shown in SonarQube.