Fixes most failing tests