Fixed a bug leading to java.util.ConcurrentModificationException