 
     end: () =>
         if not @closed
+            if @isempty
+                @isempty = no
+                @isselfclosing = yes
             @closed = 'approving'
             close_tag = =>
-                if @isempty
-                    @closed = 'self'
-                else
-                    @closed = yes
+                @closed = yes
                 @emit 'close', this
                 @writable = false
                 set_ready = =>

        @parent = @builder
        @closed = no
        @writable = true
        @hidden = no
        @isready = no
        @isempty = yes
        @content = ""
        @children children, opts
        @$tag = sync_tag


    toString: () =>
        "<#{@name}#{new_attrs @attrs}" +
            if @isempty
                "/>"
            else if @closed
                ">#{@content}</#{@name}>"
