         @inboundAdapters.push channelInbound
         channelInbound.start()
         @subscriptions.push hResult.publisher
-        if cb
+        if typeof cb is "function"
           cb codes.hResultStatus.OK
       else
-        cb hResult.payload.status, hResult.payload.result
+        if typeof cb is "function"
+          cb hResult.payload.status, hResult.payload.result
 
   #
   # Method called to unsubscribe to a channel.

              result = "QuickFilter added"
              return
        if status isnt undefined
          return cb status, result
        else
          return cb codes.hResultStatus.NOT_AUTHORIZED, "already subscribed to channel " + hChannel

    @send @buildCommand(hChannel, "hSubscribe", {}, {timeout: 3000}), (hResult) =>
      if hResult.payload.status is codes.hResultStatus.OK and hResult.payload.result

                if result
                  @unsubscribe hChannel, cb
                else
                  if typeof cb is "function"
                    return cb codes.hResultStatus.OK, "QuickFilter removed"
            else
              inbound.stop()
              @inboundAdapters.splice(index, 1)
