Wrong variable reference fixed