fixed undef issue