Fix bugs with generation of html pages