fix bugs at queue