bug fix for linking parents