fixed bug in dir_readdr