fix html/json rendering