fixed the Eof case of aQueue