fix bugs in util.j.js for queue