fix bug in directory