Fix .front() on empty queue race