These commits are fixes for the broken tests.

The last commit should be a bug fix. That particular failing test appeared to be setup as expected.