Fixed bad paths when subdirectories