Resolve Sonar issues