fixed undef test