deque function cut() fixed