Fixes many of the tests