Fix: rootItem not defined