fix undef issue