Fix evaluation of traps