fixed queue print function