fixed this_dir issue