Fix issue with concurrent list modification