Fix GR foreign keys