Test case fixes

Fixing issues exposed by the included commit.