Fixed innerHTML assignment for <span> elements