Synchronize sessions to prevent ConcurrentModificationException.