clear variable when events.count = 0