A couple of fixes to avoid an exception and get the tests working correctly