diff --git a/database_caller.py b/database_caller.py
index 8bba14c..dd5b34d 100755
--- a/database_caller.py
+++ b/database_caller.py
@@ -917,6 +917,7 @@ def updateLeagueEvents(api_key, time, logf):
                     events.append(event)
                     if time == 'upcoming':
                         try:
+                            logo_files = []
                             for each in all_data['UFC'][0]['fights']:
                                 if each['fighter1pic'].split('/')[-1] not in os.listdir('logos/ufc/'):
                                     urllib.request.urlretrieve(each['fighter1pic'],'logos/ufc/' + each['fighter1pic'].split('/')[-1])
@@ -937,6 +938,7 @@ def updateLeagueEvents(api_key, time, logf):
                             pass
                     elif time == 'past':
                         try:
+                            logo_files = []
                             for each in all_data['UFC'][0]['fights']:
                                 if each['fighter1pic'].split('/')[-1] not in os.listdir('logos/ufc_past/'):
                                     urllib.request.urlretrieve(each['fighter1pic'],'logos/ufc_past/' + each['fighter1pic'].split('/')[-1])