Fixes duplicate parent ID.