Fix variable not defined error.