fix name variable access deprecation warning