correcting bug: was getting events from the cache without setting the connection