fix bugs with page.html and parsing