fixed scope of trigger bool