Fix variable access deprecation warning