fixed race condition for amqp gem