Handle NULL strings for ref
Make the enqueueing process be reentrant