Fix deprecated variable access warnings