Fixes for the cartridge agent - topology event listener

Please review and merge