Bugfix for deque usage.