made lgt_rgt 0 if no parent