Fixed post-test State handling for cleanup.