Fix bug where PDF:s were linked wrong