Fix bug in arithmetic using the same register for both operands