Fix some deprecated variables access.

Fix some deprecated variables access.