fixed the failure to write mulitple script tags in the same write