Fixed issues reported by Sonar.

Fixed issues reported by Sonar
Cosmetic