fixed bugs. works on queues
Revert "fixed bugs. works on queues"

This reverts commit dd16173567a31cd545536038a7fae0242361cb41.
fixed bugs,works on queues