Fixing error at end of running tests