diff --git a/dictionary/management/commands/create_TEI_walenty.py b/dictionary/management/commands/create_TEI_walenty.py
index 2a73eac..66a09f2 100644
--- a/dictionary/management/commands/create_TEI_walenty.py
+++ b/dictionary/management/commands/create_TEI_walenty.py
@@ -144,7 +144,7 @@ class Command(BaseCommand):
 
     def print_statistics_by_pos(self, lemmas):
         for pos in POS.objects.all():
-            pos_lemmas = lemmas.filter(entry_obj__tag=pos)
+            pos_lemmas = lemmas.filter(entry_obj__pos=pos)
             if pos_lemmas.exists():
                 count = {'frames': 0,
                          'arguments': 0}