Fix Unchecked dynamic_cast