support iOsMA, fix Macd