Fix for closing test cases