fixing issues with recursive directories