Cleanup handles regardless of success.