Fixed an invalid reference in _batch