Fix BeautifulSoup bug