Fixing flakiness of the tests because of improper property cleanup.