Fix issue with document references

When importing document the system create new field "id" in all references, it was not working properly and was using a String instead of a Number