fixed bug in Deque class