fix bug when locating load directory