Generator Fix

Pick up the last element of the thread loop.