Fixed error in fetching events