set root = 0 to prevent crash. fixes #383