batch mode fix