Fix and highlight reference errors.