fixed Queue.clear() method