Added upper limit for events fetched from database