fixed problems with beautiful soup parsing