fix matching of generic traps