Fix inventory subtraction when running a batch