modify dir, fix bug