Fix patches and dirs