Some sonar issues fixed