       if @status in ['deleted', 'synonym']
         return callback new KodingError "Topic is already set as #{@status}!"
 
-      @checkChildTopics (err) =>
+      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
 

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

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

      unless delegate.checkFlag('super-admin')
        callback new KodingError 'Access denied'
      else
        if @status is 'deleted'
          return callback new KodingError "Topic is already deleted!"

        if @status is 'synonym'
          return Relationship.remove {sourceId: @getId(), as: "synonymOf"}, deleteTag
        deleteTag null


  @fetchSkillTags:(selector, options, callback)->

        sort    : 'title' : 1
      }, callback

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

  delete: permit
    advanced: [
      { permission: 'delete own tags', validateWith: Validators.own }
