fix queues related to closed queue and poping values