fix environment access method