Clean up spaces if the test fails so we don't get space bloat