Use of proper pop-function on deque.