bugfix for registerRoot