fix variable not defined