fixed bugs after changing the directory structure