fix undef vars