Fixing code broken for html5 shim