                 ad = response.ads[loopIndex]
                 continue unless ad.nextWrapperURL?
                 do (ad) =>
-                    if parentURLs.length >= 10 or ad.nextWrapperURL in parentURLs
+                    if parentURLs.length >= 20
                         # Wrapper limit reached, as defined by the video player.
                         # Too many Wrapper responses have been received with no InLine response.
                         VASTUtil.track(ad.errorURLTemplates, ERRORCODE: 302)

    @countURLTemplateFilters: () -> URLTemplateFilters.length
    @clearUrlTemplateFilters: () -> URLTemplateFilters = []

    @parse: (url, headers, timeout, cb) ->
        @_parse url, headers, timeout, null, (err, response) ->
            cb(response)

    @_parse: (url, headers, timeout, parentURLs, cb) ->

        # Process url with defined filter
        url = filter(url) for filter in URLTemplateFilters

        return node and (node.textContent or node.text)

module.exports = VASTParser
