Merge "Fix isInEmergency bug" into sc-dev