Fixed variable reuse bug

Note: we never actually used the queue until now.