phase activity determination algorithm fix