       }, callback
 
   delete_: (callback) ->
-    tagId = @getId()
     @update {$set: status: "deleted"}, (err)=>
       return callback err if err
-      @constructor.emit 'TagIsDeleted', {tagId}
+      @constructor.emit 'TagIsDeleted', @
       callback null
 
   delete: permit

        return callback new KodingError "Tag already exists!" if found
        create data, delegate, callback

  createSynonym : permit ['create tags', 'read tags'],
    success: (client, title, callback)->
      addSynonym = (tag) =>
        @addSynonym tag, (err) =>
          return callback err if err
          @update $set: status :'synonym', (err) =>
            return callback err if err
            @constructor.emit 'TagIsSynonym', {tagId:@getId()}
            callback null

      if @status in ['deleted', 'synonym']
        return callback new KodingError "Topic is already set as #{@status}!"

      return callback new KodingError "Self reference is forbidden!" if @title is title

      # checks child topic existence
      Relationship.one "targetId": @getId(), "as": "synonymOf", (err, childTopic) =>
        return callback err if err
        if childTopic
          return callback new KodingError "##{@title} have child topics! You must first delete them"

        {delegate} = client.connection
        {group} = client.context

        JTag.one {title}, (err, tag) =>
          return callback err if err
          unless tag
            create {title, group}, delegate, (err, tag) =>
              return callback err if err
              addSynonym tag
          else if tag.status in ["synonym", "deleted"]
            return callback new KodingError "##{tag.title} already set as #{tag.status}!"
          else
            addSynonym tag

  @findSuggestions = (client, seed, options, callback)->
    {limit, blacklist, skip, category} = options

    ]
    success: (client, callback)->
      {delegate} = client.connection

      return callback new KodingError "Topic is already deleted!" if @status is 'deleted'

