fixed ordering in emma calculations