Fixing scrutinizer reported issues