Fix incorrect batch call causing infinite loop