Some fixes to text references