fixed duplicate directory selection