MADS: Implement case 361
MADS: Fix a couple of warnings