fix return code if data is broken
tweak test to fix a couple of rounding issues
tweak test to fix a couple of rounding issues