Fixed GenericReferenceField save error in some cases