Sonar issues fixed