Some small bug fixes to get the test suite running properly again