Fix patches util undefined index