Fixed Scrutinizer suggested bugs