Don't access time_pos[i] and time_neg[i] if not defined.