fix script-tag logic in index template