fixed segfault when accessing 'nextRoot'