MADS: Further gcc compilation fixes