arith: fix failing pattern match