Fix [SeeRM #8239] NoMethodError undefined method
Land #2111, variable assignment fix