fixed a return check bug in queue, and added a benchmark test for queue