Fixed denominator bug in serialising units