correct reference output according to the text in the .as