Scrutinizer warning fixes