fix html reader bugs