fix cid and add metadatas.date