Fixed html generation bug with ScriptElement.