fixing up - only clean HTML when necessary