fixed yielding when next == NULL