add check for ha_enabled flag.