Fixed a minor bug in recent batch submit code.

The bug was dormant because err was never True.