Added more tests and a section of code where the db breaks