Fix AMQP bug