fix to allow nested script tags in templates; fix loading spinner on extraction method switch