Fixed silly macro usage of \ifdef
Merge branch 'dev' into ms