fixing markup for auto-reference