fix undef value err