Fix ConcurrentModificationException issue with polling for events.
Update code to work with polling events.