lxml bug workaround