Fix: Parse the metadata before sending it to the database