         sheet.deleteRule(previous.length)
     else
       body = property + ':' + value
-      selectors = @getSelector(operation)
+      selectors = @getSelector(stylesheet, operation)
       index = sheet.insertRule(selectors + "{" + body + "}", previous.length)
     return true
 

      
      # Add rule selector to path
      else if parent.command.type == 'Iterator'
        query = parent[1]

        selectors = []
        # Prepend selectors with selectors of a parent rule
        if results?.length
          update = []

          for result, index in results
            if result.substring(0, 12) == ' [matches~="'
              update.push ' ' + @getCustomSelector(query.command.path, result)
            else
              for selector in @getRuleSelectors(parent[1])
                update.push selector + result
          results = update
        # Wrap custom selectors
        else 
          results = @getRuleSelectors(parent[1], true)


      parent = parent.parent

    return results

  getRuleSelectors: (operation) ->
    if operation[0] == ','
      for index in [1 ... operation.length] by 1
        @getRuleSelector(operation[index], operation.command)
    else
      return [@getRuleSelector(operation)]

  getRuleSelector: (operation, parent) ->
    command = operation.command


    return sheet.join('')

  getSelector: (stylesheet, operation) ->
    return @getSelectors(stylesheet, operation).join(', ')

  getSelectors: (stylesheet, operation) ->
    parent = operation
    results = wrapped = custom = undefined

