Fixed TF to work per document