Improved fix for list/non-list batches that handles non string batch names