fixing errors the test found