fix version maching plus the directory scrapping