added missing clause when filtering events