fixed directory selection when adding repository