Variable access fix

Fix some variable access.