corrects the missing dir when linking