diff --git a/sorter.py b/sorter.py
index a24ad1231f44a28e8f421d7daacd2eea361ded2e..675161ad42c9814694c981c60a147e99d90cc638 100644
--- a/sorter.py
+++ b/sorter.py
@@ -228,7 +228,7 @@ def sort_now():
 			knownerrors = query('SELECT sorterrorlog.path FROM sorterrorlog WHERE sorterrorlog.course_id = ?',course['id'])
 			ignorefiles = []
 			for path in existingvideos + knownerrors:
-				ignorefiles.append(os.path.basename(path))
+				ignorefiles.append(os.path.basename(path['path']))
 			lectures = query('SELECT * from lectures where course_id = ?',course['id'])
 			coursepath = mountpoint['mountpoint']+course['handle']
 			try: