fix mesh after math templatization/try to fix undef-val errors in light raw