Fix unsync access to queue.Len function