Fixed bugs in QuantityTester