fix trigger crash bugs for #2107