Got batched mode to work properly