Fixing bug in setting scaler events for trigger