added an afterEach call

fixes #771