fixed bug in dir_dict