Fixed issue reported by Sonar.