fix deprecated variable access method

please implement fix for deprecated variable access method.