 			name = attrListeners.pop()
 			obj = attrListeners.pop()
 			obj[name].disconnect func
+
+		# restore classes
+		if (classes = @item._classes) or @classes
+			classes.clear()
+			if @classes
+				for name in @classes
+					classes.append name
 		return
 
 	updateText: ->

			if @isScope
				@item.document.hide()
			@item.parent = null
		@item.visible = false

		for child in @children
			child.revert()

					mainItem: new Renderer[id]
					ids: {}
			else
				match = /^styles:(.+?)(?:\:(.+?))?$/.exec id
				[_, id, subid] = match
				@scope = styles[id]?.withStructure(subid)
			@isAutoParent = true
			if @scope
				@item = @scope.mainItem
