Minor fixes to satisfy sonar