fix attribute update to run in batches