Fix for ConcurrentModificationException in publishProgress method