Fixed: TypeError: NoneType object is not iterable