Add trigger enabled check to onEvent - currently failing and succeeding