fix: fixes the bug when defer or async attribute set in the html "script" element