thread safe queue - fix