fixed a bug with <display> inside <script>