Fixed undef vars