Fix NameError in queue.py.