bugfix for queue.sh