fix foreignkey