Fix references, badly generated PDF.