fixed bug with directory add