fix a bug with hasTrigger