Fixed bugs in dir_status