change some directory and fix the resulted error