Fix parsing of links