Fix for earlier versions of bs4