Fix nearly all tests