minor tweak to triggering code