Fix for unit tests.

Takes the unit test failures down from 11 to 2. This is a single change that corrects 9 unit tests.