updated code to deal with a quirk in the overlapping trigger issue not well addressed with previous commit