Cleanup in case of crash.