Last bit of test coverage and hopefully a fix for some tests