fix bugs in deque and add Subset client