fix html clipping bugs