Fix sub_dir bug.