Fix incorrect HA status calculation