fix syntax in events fetching script