Fixed isRoot variable