pulled in EMA changes from master branch