Fixed a bug I jsut introduced in the units calculations. Testing confirms functionality.