Fixed problem where parentId was 0 instead of null. Removed debugging.