Minor fixes reported by sonar