A firm voice and gradual departure are better than a retreat in panic. As a last resort, lie face down, protect your neck with your hands and arms, and don't move. This requires considerable courage, but resistance would be futile. Numerous incidents exist where a bear has sniffed and departed without serious injury. This is a remote wilderness.
Animals are wild and unpredictable.
Keep a clean camp and use common sense. Cook away from your campsite and especially keep food odors away from sleeping gear. Take every precaution to minimize encounters with bears. Chemically treat or boil water to avoid contamination by Giardialamblia other harmful organisms. River crossings are hazardous.