close script tags properly