Fixed GenericReferenceField save error in some cases

Maybe it's not the best way to fix this error, but... just fixed.