Fix __toString for entities