fixed mod ordering