Fix path and some other bugs