Fix title = h1.text(); bug