Fixing implementation of linked list based queue.