Fix rand_thin_dir