fixing bug when inserting in the database and adding  markup transform.