Fixed the foreign key constraint for real this time.