fixed  not defined error