Patches from scrutinizer