Fix Scrutinizer reported errors