fix for invalid traps