Fix deque usage