fixed mismatched foreign key constraints.