Fixes bugs in AMQ connectivity