fix HTML functions