fix bug with parenting