Modified query to retrieve correct set of existing events