fixed errors when listing existing agents and modems + some other errors