fixing child add for ref types