fix id to _id and link