Fix the problem with subdirectories