fixed issue with multiple nested directories