Fix for most failing tests, only 5 remain to fail.