check_enq.sh: fix bug when more than two queues are specified