Fix var scoping.