fix where is undefined