fix  not defined bug