add EventsFilterTest and fix bug in EventsFilter