fixed bad return in loop making loop in series for matching