Easy. Were you ever laid off? If it took you 4-5 months to find new employment, then for that 4-5 months, you were technically out of status."
Are you talking abut this under H-1 situation or EAD situation? I think you are on legal status even though you are not employed if you are under EAD. Same as OPT, right?