this should be done in a teardown to guarantee that it gets called on any kind of thrown error