fixed issue of two foreignkey in a model