Fix variable not defined