Applied patch from ScrutinizerCI