Fixed some sonar warnings.