fixed the bug of parsing links