fix html generation probs