<script defer> bug fix