Fixes provided by sonar