Make bin/upgrade work with batching.