fixing the broken tests and the errors that they were hiding