Fix deprecated variable access