fixed deque bug