Changing the gathering of nodeids to preserve the original start order