Add check on trigger bit at event level
fix compiler warnings