So is the problem with the script, or do you get the same icon if you select the index.html file manually to display it in the viewer?
You may need to debug the script. We can only offer limited time and support for this unless you link your account (it is 8 years old now, after all).