fix a potential dead lock when queue is full