Fix for a batch mode.