Fix problem when building amq
Fix build ordering