Fixed memory-use-after-free bug in BasketQueue