Fixing issues sonar has reported.