Fixing bug with concurrent changes to list