Fix race condition that might sneak in smaller batch reads/writes