Fix bug in arith

Compare the type of both left and right argument, not left twice.