fix for pages without script element