fix html parser issues