Initialize obj. This may have been causing improper usage of it as a string for the root.