Fixed race condition in queue actor