Fix crash when fetching events