Fix childs foreign key issue