dynamic_cast updates for batchlan2.cpp