Kapacitor Alert not triggered using derivation

I have a tickscript and after after upgrading to influxdb 2.5 it fails to trigger an alert:

var db = ‘telegraf’
var rp = ‘autogen’
var measurement = ‘ifName’
var groupBy =
var whereFilter = lambda: (“ifName” == ‘Ethernet1/40’) AND isPresent(“ifHCInOctets”)
var name = ‘TW1000’
var idVar = name
var message = ‘=== {{.ID}} ===\n\nStatus: {{.Level}}’
var idTag = ‘alertID’
var levelTag = ‘level’
var messageField = ‘message’
var durationField = ‘duration’
var outputDB = ‘chronograf’
var outputRP = ‘autogen’
var outputMeasurement = ‘alerts’
var triggerType = ‘threshold’
var crit = 100000

var data = stream
|from()
.database(db)
.retentionPolicy(rp)
.measurement(measurement)
.groupBy(groupBy)
.where(whereFilter)
|mean(‘ifHCInOctets’)
|derivative(‘ifHCInOctets’)
|eval(lambda: float(“ifHCInOctets_deriv”) * 8 / 1000000)
.as(‘Mbps’)

var trigger = data
|alert()
.crit(lambda: “Mbps” < crit)
.message(message)
.id(idVar)
.idTag(idTag)
.levelTag(levelTag)
.messageField(messageField)
.durationField(durationField)
.slack()

trigger
|eval(lambda: float(“value”))
.as(‘value’)
.keep()
|influxDBOut()
.create()
.database(outputDB)
.retentionPolicy(outputRP)
.measurement(outputMeasurement)
.tag(‘alertName’, name)
.tag(‘triggerType’, triggerType)

trigger
|httpOut(‘output’)