Fix variable reference to use correct type.