fixed a queue bug