fix  is undefined