Fix error that was happening when getting events.