fixed the mref and xref values for the entities