dynamic_cast updates for calcnode.cpp