Handling ConcurrentModificationException

Change-Id: I658a46df7eb8792c6a5f0176e30500e74eb02bac