correct foreign keys