fix a bug in LinkedQueue