Fix coverity issues 569415, 569416, 569417
Fix coverity issue 600070
Fix coverity issue 573580
Fix coverity issue 606007, 606008
Remove commented elements