Fix broken id assignment.