Fix ConcurrentModificationException

Fixes #107