Fix Invalid HTML

Still trying to find the best way to handle this problem.