Fix ints, and somewhat handle entity references